﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QLKDS.DTO;

namespace QLKDS.DAL
{
    public class ExportDateReportManager
    {

        public IList<ExportDateReport> ListEmployee(DateTime Date)
        {
            using (var db = new QLKDSDataContext())
            {
                var queryEmployee = from d in db.ExportBooks join c in db.Customers on d.CustomerId equals c.Id
                                    where d.Status.Equals(1)
                                    where d.ExportDate.Date.Equals(Date.Date)
                                    select new ExportDateReport { Id = d.Id, Code = d.Code,TotalAmount=d.TotalAmount,CustomerName=c.Name};

                return queryEmployee.OrderBy(d => d.Code).ToList();
            }
        }

     
    }
}
